home *** CD-ROM | disk | FTP | other *** search
/ Cocktail Hour / image.iso / COCKTAIL.DIR / Internal_8_main screen script.ls < prev    next >
Encoding:
Text File  |  1997-03-05  |  2.2 KB  |  82 lines

  1. on exitFrame
  2.   global SoundActive, OnceCheck, gQuestionVec, gProgrmPathOnHD, begin
  3.   if SoundActive and (soundBusy(1) = 0) then
  4.     sound playFile 1, gProgrmPathOnHD & "main"
  5.   end if
  6.   if OnceCheck = 0 then
  7.     cursor(-1)
  8.     set OnceCheck to 1
  9.     repeat with i = 3 to 7
  10.       puppetSprite(i, 1)
  11.       set the cursor of sprite i to [34, 35]
  12.     end repeat
  13.     repeat with i = 42 to 48
  14.       puppetSprite(i, 1)
  15.     end repeat
  16.     if soundBusy(1) = 1 then
  17.       if begin = 0 then
  18.         sound playFile 1, gProgrmPathOnHD & "main"
  19.       else
  20.         set begin to 0
  21.       end if
  22.     end if
  23.   end if
  24.   repeat with i = 3 to 7
  25.     if the member of sprite i = "origin" = 0 then
  26.       if rollOver(i) = 0 then
  27.         set the member of sprite i to member "origin"
  28.       end if
  29.     end if
  30.   end repeat
  31.   go(the frame)
  32. end
  33.  
  34. on mouseDown
  35.   global checkPress
  36.   set checkPress to the clickOn
  37.   set bDown to the clickOn
  38.   if (bDown > 2) and (bDown < 8) then
  39.     set checkVec to ["slides", "entertainment", "history", "trivia", "drinks"]
  40.     set dest to getAt(checkVec, bDown - 2)
  41.     set the member of sprite bDown to member ("main-" & dest)
  42.   else
  43.     if bDown > 41 then
  44.       buttonPressedDown(bDown, "main")
  45.     end if
  46.   end if
  47. end
  48.  
  49. on mouseUp
  50.   global checkPress, Fade, currMarker, gCurrentZone, StartMusic
  51.   set checkPress2 to the clickOn
  52.   if checkPress = checkPress2 then
  53.     set bUp to the clickOn
  54.     if (bUp > 2) and (bUp < 8) then
  55.       set checkVec to ["slides", "entAnim", "history", "triviaInit", "drinks"]
  56.       set destName to getAt(checkVec, bUp - 2)
  57.       set the member of sprite bUp to member "origin"
  58.       set Fade to 1
  59.       clearPuppets()
  60.       set x to the number of lines in field "backField"
  61.       put marker(0) into line x + 1 of field "backField"
  62.       if destName = "drinks" then
  63.         set StartMusic to 1
  64.       else
  65.         if destName = "slides" then
  66.           set gCurrentZone to 1
  67.         else
  68.           if destName = "trivia" then
  69.             set the scrollTop of member "trivia base mat.1.board" to 0
  70.             inittrivia()
  71.           end if
  72.         end if
  73.       end if
  74.       go(marker(destName))
  75.     else
  76.       if bUp > 41 then
  77.         buttonPressedUp(bUp, "main")
  78.       end if
  79.     end if
  80.   end if
  81. end
  82.